package day12;
import java.util.Scanner;

/**
 * 题目:查找组成一个偶数最接近的两个素数
 * https://www.nowcoder.com/practice/f8538f9ae3f1484fb137789dec6eedb9?tpId=37&&tqId=21283&rp=1&ru=/activity/oj&qru=/ta/huawei/question-ranking
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        int half = num/2;
        for (int i = half; i > 0 ; i--) {
            if(isPrime(i) && isPrime(num-i)) {
                System.out.println(i);
                System.out.println(num-i);
                return;
            }
        }
    }
    //判断是否是素数
    public static boolean isPrime(int n) {
        for (int i = 2; i <= Math.sqrt(n); i++) {
            if(n % i == 0) {
                return false;
            }
        }
        return true;
    }
}
